package com.hhf.job.controller;

import com.hhf.job.config.BaseJobConfig;
import com.hhf.job.controller.basic.ResponseResult;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class JobController {

    @Autowired
    private BaseJobConfig baseJobConfig;

    /**
     * 刷新定时任务配置生效
     * @return
     */
    @GetMapping("/task/refresh")
    public ResponseResult refreshTask() {
        baseJobConfig.refresh();
        return ResponseResult.success();
    }
}
